


Glitch in the Matrix

by Languidly



Category: Transformers - All Media Types
Genre: M/M
Language: English
Status: Completed
Published: 2020-06-16
Updated: 2021-02-05
Packaged: 2021-03-03 20:07:21
Rating: Not Rated
Warnings: Creator Chose Not To Use Archive Warnings
Chapters: 3
Words: 4,259
Publisher: archiveofourown.org
Story URL: https://archiveofourown.org/works/24751327
Author URL: https://archiveofourown.org/users/Languidly/pseuds/Languidly
Summary: A data file started tapping on Optimus’ HUD through the comms line, asking for download permissions. And then Megatron was purring at him slyly, “Would you like to know what I’m doing right now, Optimus?”
Relationships: Megatron/Optimus Prime
Comments: 29
Kudos: 322





	1. Chapter 1

\---

Megatron leapt on him with a snarl and Optimus went down, hard.

They had been tussling in the wreckage of the pitifully abandoned gas station for at least 10 minutes now, as Decepticons scurried back and forth hauling large amounts of energon ore from the pile that Devastator had dug up, dragging their loads to a loosely-gathered circle of Seekers who soared the precious cargo to the waiting ship overhead. Starscream had been ostentatiously commanding this particular part of the operation before Ironhide had roared out of the groundbridge and thrown himself at him, and the situation was fast degenerating into an all-out melee.

“Optimus. Must you _always_ get in the way?”

Optimus flipped Megatron over him with a well-placed kick, twisting his body out. Claws raked at him, catching him on the thigh, tearing open an access panel and sending it clattering to the ground. Megatron was similarly battered; his entire arm was sparking from where Optimus had forcibly peeled the cannon away earlier, torn circuitry fizzing mournfully as red optics glared at him.

“This pillaging of Earth’s resources is not right,” Optimus regarded his enemy gravely. “Megatron. We cannot continue to destroy this planet as we have done so many others. You know this.”

Megatron’s features twisted in an ugly scowl. “ _You_ know _nothing_ as usual, Optimus,” and then barreled forward. Optimus held his ground, already calculating the angle at which he would have to seize his attacker, to throw him up sideways...but of course Megatron, years of gladiator brawling hardcoded into him, changed his tactic at the last minute and dropped low, smashing into Optimus’ center with a punishing impact that sent the both of them sprawling. 

The Matrix hummed, and Optimus became aware, belatedly, that the open circuitry of Megatron’s arm was pushing blindly at the ports on his own open thigh panel. In a disorienting rush, Optimus suddenly found that…

He was looking at his own face, from Megatron’s optics, and Megatron was staring in utter shock back at him, from Optimus’ own face.

They both reeled backwards, the connection severed abruptly. Megatron lifted his claws in disbelief, as if making sure that he had his own body back. Optimus could barely resist the urge to give himself a once-over; his fingers grasped at the air over his chest as the Matrix settled again comfortably.

“Masteeeer!” Starscream screeched, darting between them. “We have taken what we can!”

Megatron tore his gaze away from Optimus. His thrusters fired up, and he turned without a backward glance, the Decepticons as one fleeing and scrabbling back to their ship. 

\---

Optimus hadn’t mentioned it to anyone, because it - whatever _it_ was - had lasted for less than an astrosecond, and if he hadn’t had the memory of Megatron’s own stunned expression, Optimus would have chalked the entire thing up to imagination. In any case, it had clearly been a temporary one-time glitch, courtesy of the Matrix which, for whatever higher purpose, had wanted to give them a moment’s pause.

So when Optimus awoke from defrag three days later, suffused with a completely unexpected feeling of murderous intent with a special blend of violent triumph, he had to sit for a while and gather himself, because his systems had abruptly identified the possibility that he might have been infected with a virus during the glitch, and that he could somehow have taken part of Megatron’s mad, raving personality into his own spark. 

Ratchet ran a dozen tests, even going so far as to examine the casings of Optimus’ personality modules. Everything appeared intact and quite normal.

And then Arcee burst into the room, Bumblebee hot on her heels, yelling “The Decepticons took out a human military outpost! They’ve decimated a small town-”

Optimus looked at her, and realized disturbedly that the impressions from this morning had been _live_. The connection between Megatron and himself was still there. 

He sent Arcee and Bumblebee to what was left of the town, ordering them to help search for survivors and investigate what the Decepticons had taken. Optimus himself...had to try to turn this into a tactical advantage to forestall Decepticon activity, as unreliable as it seemed. He had very little idea as to how, but he would have to find a way to quantify it, qualify it. Perhaps he would even be able to put a stop to some of Megatron’s plans if he showed Megatron that he could, in a manner of speaking, anticipate his actions.

So the next time he felt a pull on his processing that felt uncharacteristically heavy and odd, Optimus ran a systems check, took a deep breath, and pinged Megatron on a private comms channel. 

It took a few tries, but then the line was suddenly connected, and Megatron’s voice was a growl on the other end. “Optimus. To what do I owe this...displeasure?”

The heavy drag on his processor, distant yet indisputably there, grew. Optimus bit out grimly, “What are you doing?”

There was a pause. A very long pause, before Megatron echoed flatly back at him, “What. Am. I. Doing?”

“What are you planning, Megatron?” the feeling was turning into...a strange warm buzzing, flitting at the edges of Optimus’ systems. “Don’t bother playing innocent. I can sense your thoughts.”

“You-” Megatron’s voice was suddenly choked on a half-gasp, and then...he _laughed_. It was the most suspicious, incredulous laugh that Optimus had heard, and his optics narrowed automatically in response. “You, Optimus...sense my thoughts?” 

The moment when they had looked at each other from out of the other’s body was clearly a sharp memory at the forefront of Megatron’s processor, because he suddenly snapped, “It was your slagging Matrix, wasn’t it.”

“Yes,” Optimus saw no point in obfuscating. “I felt it, when your Decepticons attacked the base 3 days ago. That’s why I can tell you’re up to no good right now. Whatever you’re planning, I must ask you to stop.” He sighed inwardly, and then tried for a different, more conciliatory note. “Now that we have this connection between us, you will not be able to hide your strategies from me. There will be little in the way of surprise attacks. You must know that this is a great disadvantage.”

Megatron’s silence on the other end of the line was almost thoughtful. And then he said, brusquely, “I see.”

Optimus could not tamp down the surge of hope. “You do?”

A data file started tapping on Optimus’ HUD through the comms line, asking for download permissions. And then Megatron was purring at him slyly, “Would you like to know what I’m doing right now, Optimus?”

He scanned the file for viruses before his systems blinked a green light, and then he accepted it with an impending sense of doom, because Megatron had never conceded so easily, not even when it was clear that all the odds were stacked against him, and this was obviously a trick of some other kind that Optimus would pay for-

The file opened, and it took a split second for Optimus to realize what he was looking at. 

It was a short clip, taken through Megatron’s own optics. The spike that was jutting out from his body was enormous, glistening with lubricant, extending and contracting leisurely under Megatron’s clawed hand. Megatron was chuckling lowly, and then he breathed, “Optimus,” heavily through the line, and Optimus cut the connection so fast that he almost scrambled his receiver system.

He could feel it trickling into him, a deep welling of mirth so pure that his processor could not reconcile it with _Megatron_ , deceitful, bitter, _very well-endowed Megatron_ , and there was a crackle of something that felt suspiciously like the beginning of an overload at the corner of his system.

Optimus gave a stern order to his cooling fans, cranking them up to maximum before scanning through his backlogs and opening the longest, most tedious mission report he could find.  



	2. Chapter 2

**Summary for the Chapter:**

> Optimus turns the tables. Sort of.

Even from across the entire length of the battle chaos currently taking place, Optimus could feel the heat of the wilting look that Megatron was giving him. Optimus tried not to shift or have any of the embarrassment he was starting to feel show on his face, but putting optics on Megatron only served to make him remember the highly explicit material that the Decepticon Commander had furnished him without warning two weeks ago.

Not that Optimus hadn’t been remembering it on his own, because as hard as he’d tried to delete the offending clip from his processor, error codes and smaller copies of the file kept cropping up - one file had even saved itself as an image for quicker access. He’d finally despaired of it as a virus and locked it down under five layers of security protocols, but also couldn’t bring himself to approach Ratchet to run a systems check to clear it because the very thought of having to explain his possession of such- such _scandalous, terrible_ content made his fuel churn a little.

He had to go back to business as usual. Optimus steeled himself, pointedly ignored Megatron, and started pummeling the Decepticons closest to him instead as they squawked and fled, crates of supplies and equipment scattering left, right and center. He sent off crisp orders to Bumblebee and Bluestreak - round up the runners, get back as much of the stolen property before it could be flung across the opening space bridge - and then he cast a critical optic to the research laboratory that remained locked behind him, where the latest engineered weapons sat behind a three-foot thick steel door together with two cowering science mechs, one of whom had triggered the alarm when the Decepticons had burst onto the base. Optimus could defend this single room with ease and the main purpose of the raid would be left unfulfilled. It would not be long now before the enemy figured out as much and retreated with whatever else they could get their hands on instead.

But of course, because Megatron was the most uncooperative mech that Primus had ever had a part in, the roar came at him from above just as Optimus sent the last Eradicon flying into the wall. Then Megatron was crashing down on him, lethal fists already swinging, and Optimus twisted from his position on the ground, barely evading the blows. His servos gripped Megatron’s hips, intending to throw him, and then...they fixed there, anchoring Megatron astride him.

Megatron cocked a gleaming red optic at him in visible disbelief. “Really, Prime? Right here, right now?”

Optimus had never been as thankful for his battle mask as in that moment; heat was flashing up his circuits in wave after wave of mortification. “I- ” and of course his processor chose that very second to throw up the image of Megatron’s glistening, very large spike, which if extended now might just about reach Optimus’ glossa and then he’d be able to- An errant charge surged through his body, making his hands spasm involuntarily, hard enough to dent, and Megatron growled and tried to wrench himself up, staring at Optimus as though his rationalization unit had been shot.

They looked at each other, venting hard, and Optimus almost apologized, which would also have been completely inappropriate in his position as the _Autobot Commander_. His body didn’t seem like it was going to obey him in any case; his vocalizer was stalling and cycling repeatedly as he shoved the graphic image straight towards deletion and prayed it would stay there. In the next moment, Megatron lunged forward, slamming a hand down next to Optimus’ helm and glaring at him, so close that Optimus could feel the hot air rolling off the thick gray neck cables. There was a dizzying shift, a phantom perspective, as though he could suddenly _feel the sharp angles of his own hips - bear down with Megatron’s thighs - on himself - under Megatron._ His optics tracked upwards, on to Megatron’s mouth, and then Megatron licked his lips and Optimus froze, combat protocols abruptly going offline and transitioning into something completely different. 

Megatron could clearly sense the direction in which his processor was going - a flare of shock radiated from his EM field, quickly drawn back in before his optics narrowed. The Matrix murmured a soothing _Care, touch, don’t hurt_ in Optimus’ core...right before the blow landed, hard and dizzying on Optimus’ helm. As his audials buzzed static, Megatron hefted himself to his feet and turned away, muttering something under his breath. Optimus distantly heard “...no use defeating…” and “...weak, feeble…” but by the time his processor had recovered enough to reboot his melee programs, the glow of the space-bridge was already dissipating into the air.

\---

Arcee had been watching him very carefully since they’d gotten back to base. Well, that was not entirely true - she had been watching Optimus all the way back from the moment they had left the research laboratory, mouth set and optics slightly narrowed. He ignored it, mostly because he hadn’t been able to fully flush the warmth from his face-plates at how the encounter with Megatron had ended, but also because he knew he would not be up to answering any questions before he examined the obvious disintegration of his logic and transference modules, which he’d only be able to do with some privacy. Or a lot of privacy. 

The glitch in the Matrix was worse than he had thought. Optimus wondered if he could sink himself into it and demand an explanation or a solution, but then he imagined himself standing before the venerable Primes of old, asking them if they had ever experienced the same- if the Matrix had ever engineered any circumstances or designated a partner, anything that would have led to them being shown such a glorious spik-

His vocalizer threw out some static at that point, warranting another worried side-eye from Arcee, but he ignored that too.

Unfortunately, because Arcee was also terminally caring and equal parts suspicious, Optimus found her two steps behind him as he was striding towards his private recharge quarters. “Optimus?”

He didn’t dare to stop walking. “Yes, Arcee?”

“Earlier, when you were fighting and Megatron attacked you…”

They were 20 meters away from his door, behind which Optimus would be able to knock himself offline and hopefully recharge away from this reality. “Yes?”

“You didn’t seem to want to attack him back. Did something happen?”

15 meters. Optimus raggedly ran through his options. He was being a terrible commander, with his subordinate so clearly concerned, and he didn’t have any answers but he didn’t want to lie outright, either. With some difficulty, he managed, “It was...the Matrix.”

Arcee’s optics flashed in surprise. 10 meters.

“I sensed it, telling me not to- not to harm. Not to fight.”

Arcee’s mouth dropped open. “Not to _fight_?! But Megatron- Megatron is the _enemy_ , and then he hit you anyway, and what reason could the Matrix possibly have-?!”

5 meters. He covered the last few steps in a blinding relief, in what he hoped was a somber and not desperate manner. “Yes. I will try to...try to commune with it.” He would _not_ , at least until he was capable of framing his questions much, much less carnally. “Perhaps it will see fit to enlighten me as well. Have a good recharge, Arcee.”

She stopped short outside his door as he punched in the code and nodded to her in dismissal as authoritatively as he could. The moment the door closed between them, that damnable, delicious image of Megatron flooded his processor again. Optimus staggered to the berth, and urgently shut himself down with a manual defrag.

\---

It felt like he had only recharged a scant hour or two, though his chronometer alerted him that it was already morning. Optimus rolled over tiredly and answered the private comms request that had been persistently flashing on his HUD, already suffused with dread after the restless night. “Megatron- ”

“Don’t _Megatron_ me!” Megatron hissed vehemently at him. “Just shove your pathetic lustful dreams up your exhaust pipe and stop _thinking them in this direction!_ If I’d known that such a little stunt would completely incapacitate your worthless scrap metal- ” He was breathing heavily, and a wave of tingling warmth flared in Optimus’ chest, spreading outward like the sensuous ripple of an oil bath. 

In the haze of a half-charged processor and a sudden humming anticipation that was burning a delicious heat through his circuitry, Optimus blurted, “Are you self-servicing again?” His voice was throatier than he’d expected.

“Go smelt yourself!” Megatron snarled, and disconnected the line.


	3. Chapter 3

**Summary for the Chapter:**

> Compromise has to start somewhere...

This was unusual. 

The Decepticons rarely snuck around. In fact, they usually conducted their raids with such flash-and-bang that it would’ve taken being in stasis not to notice them at some point, especially since they tended to get louder the closer to success they were.

But they’d been quieter this time, probably because it could be considered either an exceptionally foolish or brilliant tactical move to appear _on the Autobot base_. They might have made it off the base undiscovered, too, with the successful theft of a vital energon-refining component, if Optimus had not had a niggling sense in his chest that Megatron was... _near_ , and far too pleased with himself to be up to any good.

Optimus had had a brief internal debate if the insistent tugging from the Matrix bore any rational checking out. After the last embarrassment of having been hung up on by the Decepticon warlord ten days, six hours, twenty-three minutes and seven seconds ago - not that Optimus had been keeping track, a preposterous notion - after that equally embarrassing, recharge-fogged and entirely-inappropriate question on self-servicing...no, Optimus was not very inclined to follow the whims of his esteemed ancestors for much longer. 

His own ~~hopefulness~~ caution had won out. If there was any credit at all to the strange stirrings from the Matrix, if Megatron was indeed not far, then the least Optimus could do was check ~~him~~ it out, especially since Arcee, Bulkhead and Bumblebee were away on a scouting mission at this time. It would be a tropical holiday on Cybertron if the time ever came that Megatron approached Optimus to begin talks of ceasefire, but- Optimus had never quite been able to give up that flicker of yearning either, for that possibility to come true. 

So he’d followed the satisfied, warm little Matrix-spun thread in his awareness to the hollowed out section at the very back of their hideout that served as a refinery for whatever ore the Autobots were able to come across, silently questioning the odd direction he was being taken in. And then he’d swung open the door to take in an almost unbelievable sight.

The Decepticons had tunneled through _from the other side_ of the mountain - how they had managed to do that without having been heard was a feat astonishing in itself - and were currently in possession of the isomerization unit that Wheeljack had cleverly rigged up out of various parts. It was the only thing that made the fuel on Earth even halfway palatable or functional for Cybertronian systems, and the loss of it would be an unconscionable blow to Autobot morale. 

Optimus surged forward instinctively, battle axe already transforming up as the four Decepticons hauling the unit out finally noticed him and froze.

His axe met the doubly-reinforced thickness of a fusion cannon, splitting it just a crack, and then Megatron was _there_ , right in front of Optimus, growling at his gaping underlings to hurry up and move the unit out, and- Optimus’ processor was now clearly completely infected by the glitch in the Matrix, because he’d started looking Megatron over before he could stop himself, taking in the very attractive angles of his massive pauldrons and the sensuous curves of his pelvic armor.

Megatron glared at him, optics incandescent with heat, and then snapped, “Have you gone mad, Prime?! Have you been reduced to this- this pitiable harassment? Fight me!”

_No, no fighting,_ the Matrix entreated. _He is you, and you are him. Halves of a whole._

With a roar, Megatron threw the axe off and out of Optimus’ servos, arm sweeping back wide and cannon humming to life. Bereft of his melee weapon, vaguely stunned by the revelation that the Matrix had just bestowed, Optimus did the only thing he could; he stepped forward and, bracing himself, wrapped his arms as tightly as he could around the warlord, trapping them chassis to chassis and effectively rendering Megatron’s cannon useless with proximity.

“Optimus!” Megatron’s snarl was almost desperate. “Get a hold of yourself, for slag’s sake! What in the Pit do you think you’re- ”

And then it happened again, the sensation of swinging out of his frame and into another, and Optimus was suddenly staring at himself as if in a mirror, familiar battle-mask all but a few inches away. Megatron looked back at him, aghast, from blue optics. The thrumming of their frames, heavy and hot and so close together, was doing wonderful things to Optimus’ processor and array that even furtive repeated glances at that scandalous image capture and half-baked dreams hadn’t been able to do.

It lasted only a moment before the perspective spun dizzily and switched back, but it was too late - Optimus’ dazed sensory suite had abruptly decided to act on long-dormant protocols and sent an order for his panel to open - except. It’d decided to do that the very split second before he was wrenched back into his own body.

And that meant- that meant-

It was Megatron’s panel that slid open with a _snkk_ , and before Optimus could stop himself, he’d jerked his helm down to see. Only he was still holding the warlord tightly to his own frame...so he ended up headbutting Megatron ferociously in the faceplates in an exquisite example of pure, unthinking folly.

Megatron roared with pain and outrage, twisting in a way that would have set off more than a few suggestive sparks in Optimus’ circuitry if not for the total and utter mortification that threatened to swamp his systems in a burning wave. There was a throbbing, answering pain in his own forehelm, but he had to say something, had to try and make Megatron understand-

“I apologize, I did not mean- ” he managed to stutter out, just as Megatron broke free and bellowed, “Your time here has made you a _deviant_ , Prime, and I will not stand for- _mmmff!_ ”

_Yes,_ the Matrix cooed, swirling up to cocoon them. _Pet. Love._

Megatron had gone completely still out of shock. Optimus used the opportunity to break the kiss and finish saying, with breathless and shamefaced determination, “Please, Megatron, we don’t have to fight. We- we can find a way to coexist. We are among the very last of our kind, and we owe it to our people, and to ourselves, to find a better path. We can- take care of each other, find new purpose, share what resources we have and- ”

“This connection,” Megatron interrupted bluntly, red optics pinning Optimus, “Between us. It’s not going away?”

Optimus frowned, then mentally reached inward to check. Warmth and approval swirled up at Megatron’s closeness - at the fact that they were having a normal conversation! - and Optimus smiled a little before he could stop himself. Megatron’s gaze narrowed on his lips.

“I don’t think so- ” Optimus started, and before he could say anything else, Megatron was back in his arms, kissing him aggressively, all dentae and glossa. The warlord smelled wonderful, like smoke and grit, and those powerful servos were gripping Optimus’ waist and stroking a hot trail down to his hips. Optimus found his own fingers skirting shakily right above the tempting flare of pelvic armor that he’d been so inappropriately staring at earlier. 

“Is this sudden earnestness to compromise only happening because I showed you my spike?” Megatron murmured between one lick of Optimus’ bottom lip and the next. It made Optimus’ hydraulics go a bit weak. “Or is it some advice from that little trinket in your chest? Is any of this what _you_ want, Prime, when you’re not thinking with your array?”

The memory of Megatron’s mirth the first time he’d tricked Optimus into opening that image file, the way Megatron had walked away leaving Optimus (mostly) intact after the incident at the research laboratory, the almost-laughable vehemence of Megatron being put-out by Optimus’ dreams… 

Megatron was stubborn, strong, sarcastic, and violently idealistic. He had a painfully-warped sense of honor and duty to Cybertron that came at the expense of almost everything else. 

But Megatron had also proven that he could be teasing when he had a mind to be. He was thoughtful enough to communicate his displeasure with Optimus over a private line when it was warranted, and also (brutally) honest enough to question Optimus on his real motivations now. 

Megatron was far from perfect. But Optimus wasn’t perfect, either, for all that he had strived to be.

“I won’t lie,” he managed to say between his own achingly hungry kisses, which he pressed to the corners of Megatron’s mouth. “It’s- a bit of everything. But I’m not a slave to my urges, and the Matrix can only suggest, not enforce. No, Megatron. Everything I’ve said, I feel. And everything I do...I do because I want to.”

“Good,” Megatron nipped at his glossa, and Optimus felt a startling bolt of lust streak like lightning through his lines. “Then I’ll be keeping that isomerization unit while you start drafting the terms of our cooperation.”


End file.
